home *** CD-ROM | disk | FTP | other *** search
- //-----------------------------------------------------------------------------
- // Name: Dolphin Direct3D Sample
- //
- // Copyright (C) 1999-2001 Microsoft Corporation. All rights reserved.
- //-----------------------------------------------------------------------------
-
-
- Description
- ===========
- The Dolphin sample shows an underwater scene of a dolphin swimming, with
- caustic effects on the dolphin and seafloor. The dolphin is animated using
- a technique called "tweening". The underwater effect simply uses fog, and
- the water caustics use an animated set of textures.
-
-
- Path
- ====
- Source: DXSDK\Samples\Multimedia\VBSamples\Direct3D\Dolphin
- Executable: DXSDK\Samples\Multimedia\VBSamples\Direct3D\Bin
-
-
- User's Guide
- ============
- The following keys are implemented. The dropdown menus can be used for the
- same controls.
-
- <F2> Prompts user to select a new rendering device or display mode
- <Alt+Enter> Toggles between fullscreen and windowed modes
- <Esc> Exits the app.
-
-
- Programming Notes
- =================
- Several things are happening in this sample. First of all is the use of
- fog to give an underwater effect. The fog parameters are set up in the
- InitDeviceObjects() function.
-
- The water caustics are achieved by animating a set of 32 different textures
- (caust00.tga through caust31.tga). The caustics can be blending into the
- scene using multitexturing or multi-pass blending techniques. It is
- straightforward except for one tricky situation. Since the bottom of the
- dolphin should not have caustic effects, a separate pass is done where
- ambient light is removed and the dolphin is lit from above, and then
- blending the diffuse color with the caustic texture.
-
- The dolphin is animated using a technique called "tweening", in which the
- dolphin model's vertices are linearly blending from multiple other sets of
- vertices. The source models for these other sets of vertices is loaded
- from dolphin_group.x, which consists of the dolphin model in three
- different positions. Each frame, a destination mesh is generated by
- blending some combination of the positions and normals from these meshes
- together.
-
- This sample makes use of common DirectX code (consisting of helper functions,
- etc.) that is shared with other samples on the DirectX SDK. All common
- classes and modules can be found in the following directory:
- DXSDK\Samples\Multimedia\VBSamples\Common
-
-